package com.jtcoding.chat.service;

import com.jtcoding.chat.model.User;
import org.csource.common.MyException;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * @author jason.tang
 * @create 2018-12-27 13:00
 * @description
 */
public interface UserService {

    public static final String USER_STATUS_RSC = "RSC";
    public static final String USER_STATUS_PAT = "PAT";
    public static final String USER_STATUS_ACT = "ACT";
    public static final String USER_STATUS_DIS = "DIS";

    public static final String USER_NET_STATE_ONLINE = "在线";
    public static final String USER_NET_STATE_OFFLINE = "离线";

    User userLogin(User user);

    User addUser(User user) throws Exception;

    Map<String, Object> modifyUsername(User user);

    List<User> getUserByNums(Integer... friendNum);

    List<User> searchUser(String keyword);

    User getUserByNum(Integer userNum);

    Boolean activationUser(Integer userNum);

    int modifyUserStatus(User user);

    Map<String, Object> modifySignature(User user);

    Map<String, Object> modifyUserPortrait(Integer userNum, MultipartFile file) throws IOException, MyException;

    Map<String, Object> modifyQRCode(Integer userNum) throws Exception;
}
